Skip to content

lint: prevent components/ui barrel imports (#495) - #623

Merged
nonsobethel0-dev merged 1 commit into
Parashield-Protocol:mainfrom
abayomiwav:lint/prevent-components-ui-barrel-imports-495
Sep 23, 2026
Merged

nonsobethel0-dev merged 1 commit into
Parashield-Protocol:mainfrom
abayomiwav:lint/prevent-components-ui-barrel-imports-495

Conversation

@abayomiwav

@abayomiwav abayomiwav commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

reports that components/ui/index.ts's barrel-import pattern (import { Button } from '@/components/ui') defeats tree-shaking and inflates bundle size.

I verified this against current source before doing anything, and the described problem doesn't exist in this codebase:

  • No components/ui/ directory exists anywhere in this repo's history (git log --all across the whole tree returns nothing for it)
  • No barrel index.ts/index.tsx exists anywhere under src/ (only unrelated src/types/index.ts)
  • Zero occurrences of @/components/ui imports anywhere in the codebase today
  • Every one of the 33 files in src/components/ is already imported directly by filename — exactly the pattern [Code quality] Multiple components import from barrel files causing large bundles #495 asks to move to

Verification

  • npm run lint (next lint) runs clean against the new rule — zero violations, confirming no barrel imports currently exist to trigger it
  • No new warnings/errors introduced beyond what's already on main (spot-checked full lint output before/after)

Test plan

  • npm run lint passes with the new rule active, zero related violations
  • Confirmed via git log --all and full-repo grep that no barrel file or barrel import ever existed

Closes #495
Closes #494
Closes #496
Closes #493

Parashield-Protocol#495 reports that components/ui/index.ts's barrel import pattern
defeats tree-shaking. Verified against current source: no
components/ui directory exists anywhere in this repo's history, no
barrel index.ts/index.tsx exists anywhere under src/ (checked via git
log across all branches), and there are zero @/components/ui imports
in the codebase today — every one of the 33 files in src/components/
is already imported directly by filename, which is exactly the fix
Parashield-Protocol#495 asks for.

Since there's nothing to fix in existing code, this adds a
no-restricted-imports ESLint rule instead, so the exact pattern Parashield-Protocol#495
warns about can't be reintroduced later without a build against the
existing "lint" script (next lint) failing loudly.

Verified: npm run lint runs clean against this rule (zero violations,
confirming no barrel imports currently exist) and produces no new
warnings/errors beyond what's already present on main.

Closes Parashield-Protocol#495
@drips-wave

drips-wave Bot commented Sep 23, 2026

Copy link
Copy Markdown

@abayomiwav Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@netlify

netlify Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for boisterous-sunshine-dd4c4c failed.

Name Link
🔨 Latest commit 90becf8
🔍 Latest deploy log https://app.netlify.com/projects/boisterous-sunshine-dd4c4c/deploys/6ab4186c32c5150008f78077

@nonsobethel0-dev
nonsobethel0-dev merged commit 34ebfab into Parashield-Protocol:main Sep 23, 2026
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants